import { Metadata } from "next"
import { prisma } from "@/lib/prisma"
import { EmployeeList } from "@/components/employees/employee-list"
import { EmployeeHeader } from "@/components/employees/employee-header"

export const metadata: Metadata = {
  title: "员工管理 - 商场销售系统",
  description: "员工管理页面",
}

export default async function EmployeesPage() {
  const employees = await prisma.employee.findMany({
    orderBy: {
      createdAt: 'desc'
    }
  })

  return (
    <div className="space-y-4 p-8">
      <EmployeeHeader />
      <EmployeeList employees={employees} />
    </div>
  )
} 